<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	<span class="color_red">*</span>${param.title }
</div>
	<table id="equipment" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;">
			<col width="4%" />
			<col width="4%" />
			<col width="15%" />
			<col width="13%" />
			<col width="12%" />
			<col width="13%" />
			<col width="13%" />
			<col width="13%" />
			<col width="13%" />
			<thead >
					<tr style="organization_finances/financeborder:1px solid #B7D1E6">
						<th class="TblHead" align="center" rowspan="2" >选择</th>
						<th class="TblHead" align="center" rowspan="2" >序号</th>
						<th class="TblHead" align="center" rowspan="2" >仪器、设备名称</th>
						<th class="TblHead" align="center" rowspan="2" >型号</th>
						<th class="TblHead" align="center" rowspan="2" >数量</th>
						<th class="TblHead" align="center" rowspan="2" >用途</th>
						<th class="TblHead" align="center" rowspan="2" >添置方式</th>
						<th class="TblHead" align="center" colspan="2" >经费概算</th>
					</tr>
					<tr style="organization_finances/financeborder:1px solid #B7D1E6">
							<th class="TblHead" align="center" >外汇额度</th>
						<th class="TblHead" align="center" >人民币</th>
					</tr>
			</thead>
	</table>
	<table  id="appliance_budget" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;">
			
			<col width="4%" />
			<col width="4%" />
			<col width="15%" />
			<col width="13%" />
			<col width="12%" />
			<col width="13%" />
			<col width="13%" />
			<col width="13%" />
			<col width="13%" />
			<thead >
					<tr  style="display:none"></tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selApplianceBudget" >
						</td>
						<td align="center">
							<span name="appliance_budget|appliance[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">&nbsp;
							<input name="appliance_budget|appliance[0]|appliance_name" class="input_css required " maxlength="100"  label="仪器、设备名称" value="" style="width:80%"  />
						</td>
						<td align="center">&nbsp;
							 <input name="appliance_budget|appliance[0]|model" class="input_css required " maxlength="100"  label="型号" value="" style="width:80%"  />
						</td>
						<td align="center">&nbsp;
							 <input name="appliance_budget|appliance[0]|count" class="input_css required " maxlength="100" onfocus="InitInput.setNumber(this,7,0,0)" label="数量" value="" style="text-align:right; width:80%;"  />
						</td>
						<td align="center">&nbsp;
							<input name="appliance_budget|appliance[0]|use" class="input_css required " maxlength="100"  label="用途" value="" style="width:80%"  />
						</td> 
						<td align="center">&nbsp;
							<input name="appliance_budget|appliance[0]|acquire_way" class="input_css required " maxlength="100"  label="添置方式" value="" style="width:80%"  />
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_own" name="appliance_budget|appliance[0]|foreign_currency" class="input_css required " label="外汇额度" onchange="countTable('appliance_budget','foreign_currency_total','7');"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)" onchange="countFund('grant_[index]_','province,loan,own,other','total');" />
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_other" name="appliance_budget|appliance[0]|rmb" class="input_css required " label="人民币"   onchange="countTable('appliance_budget','rmb_total','8');"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_[index]_','province,loan,own,other','total');"/>
						</td>
					</tr>
					
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/appliance_budget/appliance" var="appliance">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selApplianceBudget" >
						</td>
						<td align="center">
							<span name="appliance_budget/appliance[${flag}${index}]@seq_no" ><x:out select="$appliance/@seq_no"/></span> 
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/appliance_name"/>" class="input_css required " label="仪器、设备名称" name="appliance_budget/appliance[${flag}${index}]/appliance_name" maxlength="100" style=" width:80%;"  /> 
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/model"/>" class="input_css required " maxlength="100" label="型号"    name="appliance_budget/appliance[${flag}${index}]/model" style="  width:80%;" />
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/count"/>" class="input_css required " maxlength="100" label="数量"  onfocus="InitInput.setNumber(this,7,0,0)"  style="text-align:right; width:80%;"  name="appliance_budget/appliance[${flag}${index}]/count" style="  width:80%;" />
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/use"/>" class="input_css required " maxlength="100"  label="用途"   name="appliance_budget/appliance[${flag}${index}]/use" style=" width:80%;" />
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/acquire_way"/>" class="input_css required " maxlength="100"  label="添置方式"   name="appliance_budget/appliance[${flag}${index}]/acquire_way" style=" width:80%;"/>
						</td>
						<td align="center">&nbsp; 
							<input value="<x:out select="$appliance/foreign_currency"/>" class="input_css required " maxlength="100"  label="外汇额度"  onchange="countTable('appliance_budget','foreign_currency_total','7');"  name="appliance_budget/appliance[${flag}${index}]/foreign_currency" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"/>
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$appliance/rmb"/>" class="input_css required " label="人民币"   maxlength="100"  onchange="countTable('appliance_budget','rmb_total','8');"  name="appliance_budget/appliance[${flag}${index}]/rmb" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  />
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
					</table>
					<table cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;">
					<col width="4%" />
					<col width="4%" />
					<col width="15%" />
					<col width="13%" />
					<col width="12%" />
					<col width="13%" />
					<col width="13%" />
					<col width="13%" />
					<col width="13%" />
				<tr>
					<td align="right" colspan="7">经费合计：</td>
					<td align="center">&nbsp;
					   <input type="text" name="appliance_budget/foreign_currency_total" id="foreign_currency_total" onfocus="InitInput.setNumber(this,7,4,2)"  label="外汇额度合计"   style="text-align: right; width:80%" disabled class="gray input_text" value="<x:out select="$xmlData/data/appliance_budget/foreign_currency_total" />"/>
					</td>
					<td align="center">&nbsp;
					   <input type="text" name="appliance_budget/rmb_total" id="rmb_total" onfocus="InitInput.setNumber(this,7,4,2)"  label="人民币合计"   style="text-align: right; width:80%"  disabled class="gray input_text" value="<x:out select="$xmlData/data/appliance_budget/rmb_total" />"/>
					</td>
					<td></td>
				</tr>
				 </table>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('appliance_budget',99,'${param.tips}最多只能填写99条')){addNewRow('appliance_budget');showDateTag('appliance_budget');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('appliance_budget','selApplianceBudget')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('appliance_budget','selApplianceBudget')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('appliance_budget','${param.tips }');countTable('appliance_budget','foreign_currency_total','7');countTable('appliance_budget','rmb_total','8');">
					</td></tr>
	</table>
	<br/>
<script type="text/javascript">
$(function() {
	$("#appliance_budget tr:even").addClass("li_1");
	$("#appliance_budget tr:odd").addClass("li_2");
});
</script>